//2022302111482
using System;

namespace homework1
{
    class FindPrime
    {
        static void Main(string[] args)
        {
            int number = int.Parse(Console.ReadLine());
            for (int i=2;number!=1;i++)
            {
                if (number%i==0)
                {
                    number /= i;
                    Console.Write(i + " ");
                }
                while (number % i == 0) number /= i;
            }
        }
    }
}
